import 'dayjs/locale/zh-cn';
import React from 'react';
import { useAccess } from 'umi';
import TablePromotionExecute from './components/TablePromotionExecute';
import TablePromotionProject from './components/TablePromotionProject';

export default (): React.ReactNode => {
  const access = useAccess();

  const container = () => {
    const a = access.签到推广x列表x管理员;
    if (a) {
      return <TablePromotionProject />;
    } else {
      return <TablePromotionExecute />;
    }
  };

  return <>{container()}</>;
};
